////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  Filename:    ParisBeautyGuts.h                                            //
//  Developer:   Phillip Sharpless                                            //
//  Create date: 06/05/2006                                                   //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  Description: This is the class declaration for the slot gut of the        //
//               Australian Slot machine called Paris Beauty                  //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
//        Copyright (c) 2006 - Realtime Gaming.  All rights reserved.         //
////////////////////////////////////////////////////////////////////////////////

#if !defined(__PARISBEAUTYGUTS_H__)
#define __PARISBEAUTYGUTS_H__

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "slotguts.h"
#include "getrand.h"

class ParisBeautyGuts : public SlotGuts
{
	// Shared enums between client and server
	#include "ParisBeautyCommon.h"

public:
	ParisBeautyGuts();

	virtual ~ParisBeautyGuts();

	virtual void classifyStops( SpinLine* spinline, uint8* stops, uint8 bet, uint8 line,
		uint8& rtnresult, uint8& multiplier );

	virtual void classifyScatters( SlotSpin *spin );

    virtual bool8 isValidGuts();

    virtual void getGameModeMultiplierAndNoteId( uint8& nGameModeMultiplier, uint8& nNoteId );

protected:

	virtual void preSpinClassifyResults( SlotSpin *spin );
	virtual void Debug_SetLoserStops( uint8* pStops );

private:

	// Helpful lookup arrays.
	static SpinResult m_aLineWinSpinResults[][6];
	static SpinResult m_aScatterWinSpinResults[6];

	// Inline functions to use with the arrays that also do
	// bounds checking.
	static SpinResult lookupLineWinSpinResult(uint8 nIconType, uint8 nCount )
	{
		if ( nIconType < NUM_VALID_ICONS && nCount < 6 )
		{
			return m_aLineWinSpinResults[ nIconType ][ nCount ];
		}

		ASSERT( false );
		return EVT_INVALID;
	}

	static SpinResult lookupScatterWinSpinResult( uint8 nCount )
	{
		if ( nCount < 6 )
		{
			return m_aScatterWinSpinResults[ nCount ];
		}

		ASSERT( false );
		return EVT_INVALID;
	}

	//helper functions for classifyStops
	SpinResult getLineWinResultWithPossibleSubstitution(
		uint8* stops, uint8 testIcon, bool& bSubstitution ) const;

	//helper functions for classifyScatters
	void tryForJackpot( SlotSpin* spin );

	SpinResult getScatterWinResult( 
		SlotSpin* spin, int32& scatterPositions) const;


	void evaluateScatterWin( SlotSpin* spin, SpinResult srScatterResult, int32 scatterPositions);
	void evaluateFeatureTrigger( SlotSpin* spin, SpinResult srScatterResult, int32 scatterPositions);

	//helper functions to handle the reel hold subgame data
	int32 getReelHoldStop( uint8 nReel );
	void setReelHoldStop( uint8 nReel, int32 nStop );
	void resetReelHoldStops();
};


#endif // !defined(__PARISBEAUTYGUTS_H__)
